package com.tarena.lbs.business.dao.repository.Impl;

import com.tarena.lbs.business.dao.mapper.BusinessCategoryMapper;
import com.tarena.lbs.business.dao.repository.BusinessCategoryRepository;
import com.tarena.lbs.business.pojo.po.BusinessCategoryPO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;


import java.util.List;

@Repository
@Slf4j
public class BusinessCategoryRepositoryImpl implements BusinessCategoryRepository {
    @Autowired
    private BusinessCategoryMapper businessCategoryMapper;


    @Override
    public List<BusinessCategoryPO> findAll() {
        log.info("开始执行查询所有分类指令");
        List<BusinessCategoryPO> businessCategoryPOS = businessCategoryMapper.selectList(null);
        log.info("查询所有分类指令执行完毕,共查询到分类{}",businessCategoryPOS);
        return businessCategoryPOS;
    }
}
